From 67b4c5b77e5e56c59423e133f86e3971b32a957d Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 6 Feb 2006 23:33:58 +0100 Subject: [PATCH] Remove CONFIG_VMX and CONFIG_SVM compile options. Support will always be compiled into Xen. Signed-off-by: Keir Fraser --- xen/arch/x86/cpu/amd.c | 2 -- xen/arch/x86/cpu/intel.c | 2 -- xen/arch/x86/hvm/svm/emulate.c | 3 --- xen/arch/x86/hvm/svm/instrlen.c | 2 -- xen/arch/x86/hvm/svm/intr.c | 4 ---- xen/arch/x86/hvm/svm/svm.c | 3 --- xen/arch/x86/hvm/svm/vmcb.c | 3 --- xen/arch/x86/hvm/svm/x86_32/exits.S | 4 ---- xen/arch/x86/hvm/svm/x86_64/exits.S | 3 --- xen/arch/x86/hvm/vmx/io.c | 3 --- xen/arch/x86/hvm/vmx/vmcs.c | 3 --- xen/arch/x86/hvm/vmx/vmx.c | 4 ---- xen/arch/x86/hvm/vmx/x86_32/exits.S | 4 ---- xen/arch/x86/hvm/vmx/x86_64/exits.S | 4 ---- xen/arch/x86/x86_32/asm-offsets.c | 2 -- xen/arch/x86/x86_64/asm-offsets.c | 2 -- xen/include/asm-x86/config.h | 2 -- xen/include/asm-x86/hvm/svm/emulate.h | 4 ---- xen/include/asm-x86/hvm/svm/intr.h | 4 ---- xen/include/asm-x86/hvm/svm/svm.h | 3 --- xen/include/asm-x86/hvm/svm/vmcb.h | 4 ---- xen/include/asm-x86/hvm/svm/vmmcall.h | 4 ---- xen/include/asm-x86/hvm/vcpu.h | 9 --------- xen/include/asm-x86/hvm/vmx/cpu.h | 4 ---- xen/include/asm-x86/hvm/vmx/vmcs.h | 4 ---- xen/include/asm-x86/hvm/vmx/vmx.h | 4 ---- 26 files changed, 90 deletions(-) diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c index 9a21147ca5..6dcf15c527 100644 --- a/xen/arch/x86/cpu/amd.c +++ b/xen/arch/x86/cpu/amd.c @@ -248,9 +248,7 @@ static void __init init_amd(struct cpuinfo_x86 *c) } #endif -#ifdef CONFIG_SVM start_svm(); -#endif } static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size) diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c index 98fe22ba87..9062b8786a 100644 --- a/xen/arch/x86/cpu/intel.c +++ b/xen/arch/x86/cpu/intel.c @@ -187,9 +187,7 @@ static void __init init_intel(struct cpuinfo_x86 *c) if (c->x86 == 6) set_bit(X86_FEATURE_P3, c->x86_capability); -#ifdef CONFIG_VMX start_vmx(); -#endif } diff --git a/xen/arch/x86/hvm/svm/emulate.c b/xen/arch/x86/hvm/svm/emulate.c index 32be10f28c..4ac1375f49 100644 --- a/xen/arch/x86/hvm/svm/emulate.c +++ b/xen/arch/x86/hvm/svm/emulate.c @@ -27,8 +27,6 @@ #include #include -#ifdef CONFIG_SVM - extern int inst_copy_from_guest(unsigned char *buf, unsigned long guest_eip, int inst_len); @@ -504,7 +502,6 @@ unsigned int __get_instruction_length_from_list(struct vmcb_struct *vmcb, "eip = %lx\n", __func__, (unsigned long)vmcb->rip); return 0; } -#endif /* CONFIG_SVM */ /* * Local variables: diff --git a/xen/arch/x86/hvm/svm/instrlen.c b/xen/arch/x86/hvm/svm/instrlen.c index 4466ae7b46..07743820c9 100644 --- a/xen/arch/x86/hvm/svm/instrlen.c +++ b/xen/arch/x86/hvm/svm/instrlen.c @@ -23,7 +23,6 @@ #define DPRINTF DPRINTK #include -#ifdef CONFIG_SVM /* * Opcode effective-address decode tables. * Note that we only emulate instructions that have at least one memory @@ -432,4 +431,3 @@ cannot_emulate: svm_dump_inst(_regs.eip); return (unsigned long)-1; } -#endif /* CONFIG_SVM */ diff --git a/xen/arch/x86/hvm/svm/intr.c b/xen/arch/x86/hvm/svm/intr.c index e63ad8ce1a..9ddaacee7a 100644 --- a/xen/arch/x86/hvm/svm/intr.c +++ b/xen/arch/x86/hvm/svm/intr.c @@ -38,8 +38,6 @@ #include #include -#ifdef CONFIG_SVM - /* * Most of this code is copied from vmx_io.c and modified * to be suitable for SVM. @@ -206,8 +204,6 @@ asmlinkage void svm_intr_assist(void) } } -#endif /* CONFIG_SVM */ - /* * Local variables: * mode: C diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 4a15f8cd6c..ba99592b6f 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -50,8 +50,6 @@ #include #include -#ifdef CONFIG_SVM - #define SVM_EXTRA_DEBUG #ifdef TRACE_BUFFER @@ -2698,7 +2696,6 @@ asmlinkage void svm_asid(void) } clear_bit(ARCH_SVM_VMCB_ASSIGN_ASID, &v->arch.hvm_svm.flags); } -#endif /* CONFIG_SVM */ /* * Local variables: diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c index 74bef8c251..f55b88dc45 100644 --- a/xen/arch/x86/hvm/svm/vmcb.c +++ b/xen/arch/x86/hvm/svm/vmcb.c @@ -36,8 +36,6 @@ #include #include -#ifdef CONFIG_SVM - extern int svm_dbg_on; extern int asidpool_assign_next( struct vmcb_struct *vmcb, int retire_current, int oldcore, int newcore); @@ -589,7 +587,6 @@ void svm_dump_vmcb(const char *from, struct vmcb_struct *vmcb) svm_dump_sel("IDTR", &vmcb->idtr); svm_dump_sel("TR", &vmcb->tr); } -#endif /* CONFIG_SVM */ /* * Local variables: diff --git a/xen/arch/x86/hvm/svm/x86_32/exits.S b/xen/arch/x86/hvm/svm/x86_32/exits.S index 9528f16a1e..33a0274078 100644 --- a/xen/arch/x86/hvm/svm/x86_32/exits.S +++ b/xen/arch/x86/hvm/svm/x86_32/exits.S @@ -80,8 +80,6 @@ popl %eax; \ addl $(NR_SKIPPED_REGS*4), %esp -#ifdef CONFIG_SVM - ALIGN #define VMRUN .byte 0x0F,0x01,0xD8 @@ -216,5 +214,3 @@ svm_process_softirqs: sti call do_softirq jmp svm_test_all_events -#endif /* CONFIG_SVM */ - diff --git a/xen/arch/x86/hvm/svm/x86_64/exits.S b/xen/arch/x86/hvm/svm/x86_64/exits.S index 3e8eadbe02..b299295a6a 100644 --- a/xen/arch/x86/hvm/svm/x86_64/exits.S +++ b/xen/arch/x86/hvm/svm/x86_64/exits.S @@ -92,7 +92,6 @@ popq %rdi; \ addq $(NR_SKIPPED_REGS*8), %rsp; \ -#ifdef CONFIG_SVM #define VMRUN .byte 0x0F,0x01,0xD8 #define VMLOAD .byte 0x0F,0x01,0xDA #define VMSAVE .byte 0x0F,0x01,0xDB @@ -175,5 +174,3 @@ svm_process_softirqs: sti call do_softirq jmp svm_test_all_events -#endif /* CONFIG_SVM */ - diff --git a/xen/arch/x86/hvm/vmx/io.c b/xen/arch/x86/hvm/vmx/io.c index 7b3975194c..0d9449bb02 100644 --- a/xen/arch/x86/hvm/vmx/io.c +++ b/xen/arch/x86/hvm/vmx/io.c @@ -38,8 +38,6 @@ #include #include -#ifdef CONFIG_VMX - #define BSP_CPU(v) (!(v->vcpu_id)) void vmx_set_tsc_shift(struct vcpu *v, struct hvm_virpit *vpit) @@ -194,7 +192,6 @@ void vmx_do_resume(struct vcpu *v) /* We can't resume the guest if we're waiting on I/O */ ASSERT(!test_bit(ARCH_HVM_IO_WAIT, &v->arch.hvm_vcpu.ioflags)); } -#endif /* CONFIG_VMX */ /* * Local variables: diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 0163e2133b..70bc6111f3 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -39,8 +39,6 @@ #include #endif -#ifdef CONFIG_VMX - int vmcs_size; struct vmcs_struct *alloc_vmcs(void) @@ -539,7 +537,6 @@ void arch_vmx_do_launch(struct vcpu *v) vmx_do_launch(v); reset_stack_and_jump(vmx_asm_do_launch); } -#endif /* CONFIG_VMX */ /* * Local variables: diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 9f9e1cc446..87324155eb 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -48,9 +48,6 @@ #include #include - -#ifdef CONFIG_VMX - static unsigned long trace_values[NR_CPUS][4]; #define TRACE_VMEXIT(index,value) trace_values[smp_processor_id()][index]=value @@ -2001,7 +1998,6 @@ asmlinkage void vmx_trace_vmexit (void) TRACE_3D(TRC_VMEXIT,0,0,0); return; } -#endif /* CONFIG_VMX */ /* * Local variables: diff --git a/xen/arch/x86/hvm/vmx/x86_32/exits.S b/xen/arch/x86/hvm/vmx/x86_32/exits.S index 5650683a06..7846cca10b 100644 --- a/xen/arch/x86/hvm/vmx/x86_32/exits.S +++ b/xen/arch/x86/hvm/vmx/x86_32/exits.S @@ -81,8 +81,6 @@ ALIGN -#ifdef CONFIG_VMX - ENTRY(vmx_asm_vmexit_handler) /* selectors are restored/saved by VMX */ HVM_SAVE_ALL_NOSEGREGS @@ -148,5 +146,3 @@ ENTRY(vmx_asm_do_resume) ENTRY(vmx_asm_do_relaunch) vmx_asm_common 1 1 - -#endif /* CONFIG_VMX */ diff --git a/xen/arch/x86/hvm/vmx/x86_64/exits.S b/xen/arch/x86/hvm/vmx/x86_64/exits.S index bfc581e461..bd411fa527 100644 --- a/xen/arch/x86/hvm/vmx/x86_64/exits.S +++ b/xen/arch/x86/hvm/vmx/x86_64/exits.S @@ -91,7 +91,6 @@ popq %rdi; \ addq $(NR_SKIPPED_REGS*8), %rsp; \ -#ifdef CONFIG_VMX ENTRY(vmx_asm_vmexit_handler) /* selectors are restored/saved by VMX */ HVM_SAVE_ALL_NOSEGREGS @@ -155,6 +154,3 @@ ENTRY(vmx_asm_do_resume) ENTRY(vmx_asm_do_relaunch) vmx_asm_common 1 1 - -#endif /* CONFIG_VMX */ - diff --git a/xen/arch/x86/x86_32/asm-offsets.c b/xen/arch/x86/x86_32/asm-offsets.c index cda414b5a5..a7e970b92b 100644 --- a/xen/arch/x86/x86_32/asm-offsets.c +++ b/xen/arch/x86/x86_32/asm-offsets.c @@ -72,7 +72,6 @@ void __dummy__(void) DEFINE(_VCPUF_nmi_masked, _VCPUF_nmi_masked); BLANK(); -#ifdef CONFIG_SVM OFFSET(VCPU_svm_vmcb_pa, struct vcpu, arch.hvm_svm.vmcb_pa); OFFSET(VCPU_svm_hsa_pa, struct vcpu, arch.hvm_svm.host_save_pa); OFFSET(VCPU_svm_vmcb, struct vcpu, arch.hvm_svm.vmcb); @@ -82,7 +81,6 @@ void __dummy__(void) OFFSET(VMCB_rax, struct vmcb_struct, rax); OFFSET(VMCB_tsc_offset, struct vmcb_struct, tsc_offset); BLANK(); -#endif OFFSET(VCPUINFO_upcall_pending, vcpu_info_t, evtchn_upcall_pending); OFFSET(VCPUINFO_upcall_mask, vcpu_info_t, evtchn_upcall_mask); diff --git a/xen/arch/x86/x86_64/asm-offsets.c b/xen/arch/x86/x86_64/asm-offsets.c index 499ca07057..91e9e81027 100644 --- a/xen/arch/x86/x86_64/asm-offsets.c +++ b/xen/arch/x86/x86_64/asm-offsets.c @@ -72,7 +72,6 @@ void __dummy__(void) DEFINE(_VCPUF_nmi_masked, _VCPUF_nmi_masked); BLANK(); -#ifdef CONFIG_SVM OFFSET(VCPU_svm_vmcb_pa, struct vcpu, arch.hvm_svm.vmcb_pa); OFFSET(VCPU_svm_hsa_pa, struct vcpu, arch.hvm_svm.host_save_pa); OFFSET(VCPU_svm_vmcb, struct vcpu, arch.hvm_svm.vmcb); @@ -82,7 +81,6 @@ void __dummy__(void) OFFSET(VMCB_rax, struct vmcb_struct, rax); OFFSET(VMCB_tsc_offset, struct vmcb_struct, tsc_offset); BLANK(); -#endif OFFSET(VCPUINFO_upcall_pending, vcpu_info_t, evtchn_upcall_pending); OFFSET(VCPUINFO_upcall_mask, vcpu_info_t, evtchn_upcall_mask); diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h index bc65b72507..27ae8c3a96 100644 --- a/xen/include/asm-x86/config.h +++ b/xen/include/asm-x86/config.h @@ -18,8 +18,6 @@ #define CONFIG_X86 1 #define CONFIG_X86_HT 1 #define CONFIG_SHADOW 1 -#define CONFIG_VMX 1 -#define CONFIG_SVM 1 #define CONFIG_SMP 1 #define CONFIG_X86_LOCAL_APIC 1 #define CONFIG_X86_GOOD_APIC 1 diff --git a/xen/include/asm-x86/hvm/svm/emulate.h b/xen/include/asm-x86/hvm/svm/emulate.h index 1dba011969..d9a9a28961 100644 --- a/xen/include/asm-x86/hvm/svm/emulate.h +++ b/xen/include/asm-x86/hvm/svm/emulate.h @@ -21,8 +21,6 @@ #ifndef __ASM_X86_HVM_SVM_EMULATE_H__ #define __ASM_X86_HVM_SVM_EMULATE_H__ -#ifdef CONFIG_SVM - typedef enum OPERATING_MODE_ { INVALID_OPERATING_MODE = -1, LEGACY_MODE, @@ -146,8 +144,6 @@ static void inline __update_guest_eip(struct vmcb_struct *vmcb, vmcb->rip += inst_len; } -#endif /* CONFIG_SVM */ - #endif /* __ASM_X86_HVM_SVM_EMULATE_H__ */ /* diff --git a/xen/include/asm-x86/hvm/svm/intr.h b/xen/include/asm-x86/hvm/svm/intr.h index 763545ec00..1a5fb5e312 100644 --- a/xen/include/asm-x86/hvm/svm/intr.h +++ b/xen/include/asm-x86/hvm/svm/intr.h @@ -21,14 +21,10 @@ #ifndef __ASM_X86_HVM_SVM_INTR_H__ #define __ASM_X86_HVM_SVM_INTR_H__ -#ifdef CONFIG_SVM - extern void svm_set_tsc_shift(struct vcpu *v, struct hvm_virpit *vpit); extern void svm_intr_assist(void); extern void svm_intr_assist_update(struct vcpu *v, int highest_vector); extern void svm_intr_assist_test_valid(struct vcpu *v, unsigned long *intr_result); -#endif /* CONFIG_SVM */ - #endif /* __ASM_X86_HVM_SVM_INTR_H__ */ diff --git a/xen/include/asm-x86/hvm/svm/svm.h b/xen/include/asm-x86/hvm/svm/svm.h index 3fc54c638c..097fd2da1a 100644 --- a/xen/include/asm-x86/hvm/svm/svm.h +++ b/xen/include/asm-x86/hvm/svm/svm.h @@ -28,7 +28,6 @@ #include #include -#ifdef CONFIG_SVM extern void asidpool_retire( struct vmcb_struct *vmcb, int core ); extern void svm_asm_vmexit_handler(struct cpu_user_regs); @@ -86,6 +85,4 @@ struct asid_pool { #define SVM_REG_R14 (14) #define SVM_REG_R15 (15) -#endif /* CONFIG_SVM */ - #endif /* __ASM_X86_HVM_SVM_H__ */ diff --git a/xen/include/asm-x86/hvm/svm/vmcb.h b/xen/include/asm-x86/hvm/svm/vmcb.h index 14d8e9194a..97a8837c21 100644 --- a/xen/include/asm-x86/hvm/svm/vmcb.h +++ b/xen/include/asm-x86/hvm/svm/vmcb.h @@ -23,8 +23,6 @@ #include #include -#ifdef CONFIG_SVM - extern int start_svm(void); /* general 1 intercepts */ @@ -488,8 +486,6 @@ enum { #define VMCB_EFLAGS_RESERVED_0 0xffc08028 /* bitmap for 0 */ #define VMCB_EFLAGS_RESERVED_1 0x00000002 /* bitmap for 1 */ -#endif /* CONFIG_SVM */ - #endif /* ASM_X86_HVM_SVM_VMCS_H__ */ /* diff --git a/xen/include/asm-x86/hvm/svm/vmmcall.h b/xen/include/asm-x86/hvm/svm/vmmcall.h index b138aea90a..41c40473f9 100644 --- a/xen/include/asm-x86/hvm/svm/vmmcall.h +++ b/xen/include/asm-x86/hvm/svm/vmmcall.h @@ -22,8 +22,6 @@ #ifndef __ASM_X86_HVM_SVM_VMMCALL_H__ #define __ASM_X86_HVM_SVM_VMMCALL_H__ -#ifdef CONFIG_SVM - /* VMMCALL command fields */ #define VMMCALL_CODE_CPL_MASK 0xC0000000 #define VMMCALL_CODE_MBZ_MASK 0x3FFF0000 @@ -43,6 +41,4 @@ static inline int get_vmmcall_cpl(int cmd) return (cmd & VMMCALL_CODE_CPL_MASK) >> 30; } -#endif /* CONFIG_SVM */ - #endif /* __ASM_X86_HVM_SVM_VMMCALL_H__ */ diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h index c5f4b8c613..5e0a11c40f 100644 --- a/xen/include/asm-x86/hvm/vcpu.h +++ b/xen/include/asm-x86/hvm/vcpu.h @@ -22,13 +22,8 @@ #include #include - -#ifdef CONFIG_VMX #include -#endif -#ifdef CONFIG_SVM #include -#endif struct hvm_vcpu { unsigned long ioflags; @@ -36,12 +31,8 @@ struct hvm_vcpu { struct vlapic *vlapic; union { -#ifdef CONFIG_VMX struct arch_vmx_struct vmx; -#endif -#ifdef CONFIG_SVM struct arch_svm_struct svm; -#endif } u; }; diff --git a/xen/include/asm-x86/hvm/vmx/cpu.h b/xen/include/asm-x86/hvm/vmx/cpu.h index 606cf40ef6..40161b7231 100644 --- a/xen/include/asm-x86/hvm/vmx/cpu.h +++ b/xen/include/asm-x86/hvm/vmx/cpu.h @@ -19,8 +19,6 @@ #ifndef __ASM_X86_HVM_VMX_CPU_H__ #define __ASM_X86_HVM_VMX_CPU_H__ -#ifdef CONFIG_VMX - /* * Virtual CPU */ @@ -34,6 +32,4 @@ struct arch_state_struct { #define VMX_MF_32 1 #define VMX_MF_64 2 -#endif /* CONFIG_VMX */ - #endif /* __ASM_X86_HVM_VMX_CPU_H__ */ diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/asm-x86/hvm/vmx/vmcs.h index 8092969e49..84b407367b 100644 --- a/xen/include/asm-x86/hvm/vmx/vmcs.h +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h @@ -24,8 +24,6 @@ #include #include -#ifdef CONFIG_VMX - extern int start_vmx(void); extern void stop_vmx(void); @@ -248,8 +246,6 @@ enum vmcs_field { HOST_RIP = 0x00006c16, }; -#endif /* CONFIG_VMX */ - #endif /* ASM_X86_HVM_VMX_VMCS_H__ */ /* diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/include/asm-x86/hvm/vmx/vmx.h index 7d6d2bce92..52b0551c12 100644 --- a/xen/include/asm-x86/hvm/vmx/vmx.h +++ b/xen/include/asm-x86/hvm/vmx/vmx.h @@ -26,8 +26,6 @@ #include #include -#ifdef CONFIG_VMX - extern void vmx_asm_vmexit_handler(struct cpu_user_regs); extern void vmx_asm_do_resume(void); extern void vmx_asm_do_launch(void); @@ -458,6 +456,4 @@ static inline int vmx_reflect_exception(struct vcpu *v) return 0; } -#endif /* CONFIG_VMX */ - #endif /* __ASM_X86_HVM_VMX_VMX_H__ */ -- 2.30.2